﻿using System.Collections.Generic;

public class NoticeTipsController : ControllerBase
{
	private NoticeTipsWin _win;
	private readonly Queue<string> _tipsQueue;

	public NoticeTipsController()
	{
		_windowPath = Window.NoticeTipsWin;
		_tipsQueue = new Queue<string>();
	}

	protected override void Init()
	{
		base.Init();
		_win = _mono as NoticeTipsWin;
		_win.Serves = this;
	}

	public void UpdateInfo(string tip)
	{
		_tipsQueue.Enqueue(tip);
		if (_win != null) _win.UpdateInfo();
		else WindowManager.GetInstance().OpenWindow(Window.NoticeTipsWin);
	}

	public Queue<string> TipsQueue { get { return _tipsQueue; } }
}